package com.codi.bus.core.service;

import com.codi.base.domain.BaseResult;
import com.codi.base.exception.BaseAppException;
import com.codi.bus.core.domain.FundCombination;
import com.codi.bus.core.resultModel.FundCombinationDetailsResult;
import com.codi.bus.core.resultModel.FundCombinationResult;
import com.codi.bus.core.service.model.PortfolioQryModel;
import com.codi.bus.core.vo.FundCombinationVo;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;

/**
 * 基金组合
 */
public interface FundCombinationService {
    /**
     * 查询首页显示3支组合
     */
    List<FundCombinationResult> queryThreeCombinations();

    FundCombinationDetailsResult queryByCombinationCode(String combinationCode);

    List<FundCombinationResult> queryPortfolios();

    List<String> queryFundCodes(String combinationCode);

    List<FundCombination> queryAll();

    FundCombination queryOne(String combinationCode);

    FundCombination queryByPrimaryKey(Long combinationId);
    /**
     * 查询该组合下的基金s
     *
     * @param portfolioCode
     * @return
     */
    List<PortfolioQryModel> queryPorfolio(String portfolioCode);

    BaseResult queryPorfolio(Pageable pageable);

    int addPorfolio(FundCombination combination);

    int updatePorfolio(FundCombination combination);

    void updateFundCombination() throws BaseAppException;

    void updateFundCombination2(Date currentDate) throws BaseAppException;

    int deleteByCombinationCode(String combinationCode);

    List<FundCombinationVo> getDailyGrowthRates() throws BaseAppException;
}
